package pl.edu.agh.ki.neuralnetwork.neurons;

import java.util.List;

import pl.edu.agh.ki.neuralnetwork.exceptions.NeuronNotConnectedException;

public class GrossbergSigmoidalNeuron extends SigmoidalNeuron implements GrossbergNeuron {
	private InnerNeuron kohonenWinner;
	
	public GrossbergSigmoidalNeuron(List<Neuron> inputNeuronsList, List<Double> weights) {
		super(inputNeuronsList,weights);
	}

	public void computeWithWinner(InnerNeuron kohonenWinner) {
		this.kohonenWinner = kohonenWinner;
		this.compute();
	}
	
	public void compute() {
		try {
			this.output = f(this.getWeight(kohonenWinner));
		} catch (NeuronNotConnectedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
